package com.alphacsp.theedge2012.data.service;

import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;

/**
 * Created by IntelliJ IDEA.
 * User: Gilad
 * Date: 06/11/10
 * Time: 17:28
 */
public class NetworkServiceHelper extends ResultReceiver {

    private final ServiceListener listener;

    public NetworkServiceHelper(ServiceListener listener) {
        super(new Handler());
        this.listener = listener;
    }

    @Override
    protected void onReceiveResult(int resultCode, Bundle resultData) {
        if (listener != null) {
            listener.onReceiveResult(resultCode, resultData);
        }
    }
}
